<template>
  <div class="cloud_shop_agreement">
    <c-title :hide="false" :text="shop_agreement_title"></c-title>
    <div class="agreement" v-html="shop_agreement_text"></div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      shop_agreement_text: "",
      shop_agreement_title: "邀请码协议"
    };
  },
  activated() {
    this.getData();
  },
  methods: {
    async getData() {
      let { data, msg, result } = await $http.post("plugin.cloud-shop.frontend.code.agreement", {}, "");
      if (result) {
        console.log(data);
        this.shop_agreement_text = data.shop_agreement_text;
        this.shop_agreement_title = data.shop_agreement_title;
      } else {
        this.$toast(msg);
      }
    }
  }
};
</script>
<style lang="scss" scoped>
.cloud_shop_agreement {
  min-height: 100vh;
  overflow: hidden;
  background: #fff;
}
.agreement {
  margin: 0.94rem;
}
</style>
